<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>2-7 浮动布局</title>
    <p>计科2412尤佳清28</p>
    <style>
        .div1 {
            border: 2px solid #ff0000;
            margin: 10px 0 0 0; /* 去掉div1底部空隙 */
            padding: 10px;
            width: calc(100% - 44px);
            height: 60px;
            line-height: 60px;
        }
        .div2 {
            border: 2px solid #0000ff;
            width: 70px;
            height: 40px;
            float: left;
            margin: 0; /* 无任何空隙 */
            text-align: center;
            line-height: 40px;
        }
        .div3 {
            border: 2px solid #008000;
            margin: 0 0 10px 0; /* 去掉div3顶部空隙 */
            padding: 10px;
            width: calc(100% - 44px);
            height: 60px;
            line-height: 60px;
            clear: both;
        }
    </style>
</head>
<body>
    <div class="div1">div1</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div2">div2</div>
    <div class="div3">div3</div>
</body>
</html>